﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#include "/views/ftl/base/manager_include.ftl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员列表</title>
<script type="text/javascript">
$().ready(function() {
	$("#search_button").click(function(){
		$('#select_form').submit();
    });
});


function stopAccount(id,is)
{
	$.ajax({ 
		url : "${basePath }manager/Manager_deleteManager",
		data : { 
			id : id,
			is: is,
		}, 
		dataType :"JSON",
		cache : false, 
		type : "POST",
		success : function(dat){
			alert(dat.msg);
			 location.reload();	
		}
	});
}
	function openAccount(id,is)
{
		stopAccount(id,is);
		
}
</script>
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl" >

<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "管理员列表_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>权限设置</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>管理员列表</span></a>
      </div>
    </div>
    <!--搜索框修改-->
   
	  
	    <a href="${basePath}manager/Manager_addManagerUI" class="added fl"><span>新增</span></a>
    <div class="clear"></div>
    <!--表格列表-->
    <div class="Table">
      <table id="table" cellpadding="0" cellspacing="1">
        <tbody>
          <tr id="gl">
            <td>人员名称</td>
            <td>角色</td>
           
            <td>手机号码</td>
          
            <td>操作</td>
          </tr>
         <#if (list??)> 
         <#if ((list?size)>0)>
          <#list list as bean>
          <tr>
            <td>${(bean.userName)!''}</td>
 
            <td>
 	<#list bean.roles as bean2>
	${(bean2.name)!''}
 	</#list >
	</td>
           
            
            <td>${(bean.phoneNum)!''}</td>
            <td class="tbl_btn">
              <a href="${basePath}manager/Manager_editManagerUI?id=${bean.id?c}"><span id="editor">修改</span></a>
              	<a href="${basePath}manager/Manager_setRoleUI?id=${bean.id?c}"><span id="yellow">角色设置</span></a>     
              <#if (bean.isDelete==0)><a href="javascript:stopAccount(${bean.id},1);"><span id="delete">停止</span></a></#if>
                <#if (bean.isDelete==1)> <a href="javascript:openAccount(${bean.id},0);"><span id="yellow">启用</span></a></#if>
            </td>
          </tr>
          </#list >
          </#if>
          </#if>
        </tbody>
      </table>
    </div>
  
	</div>
  </div>
</div>
</body>
</html>

